Code Cleanup

Moved some macro declarations and function forward declarations into the
header file from the main file.
Merge pull request #2 from kjgregory/master

Code Cleanup