Fixed some documentation and cleaned up a little of the code
Major cleanup and added some new functionality