Adding updated header files
Made constants all-caps
Added docstrings
Cleaned up code