Documenting code, adding defines, & removing vars

Fixing out of date documentation and adding defines to clarify
numbers and more. In a few cases, variables used only once were
removed and the value not saved.