adding documentation and cleaning up the code

Getting ready to go live