Updated js and documentation
Cleaning up and documentation.