Updated documentation
Cleaned up some of the code and documentation