Welcome to TeX.sx! I took the liberty to reduce your code to a minimal working example (MWE). Please always do that before posting a question here; a MWE is our standard format and requirement, which makes it easier for others to identify your problem and help you with it. It actually turned out that none of your -- admittedly nicely organized -- preamble was relevant to the problem. You did forget \end{document} though. And I'd recommend using braces {} for \renewcommand.
–
doncherrySep 21 '12 at 4:24