Moving around js and adding documentation.