Clean up and stuff

Created a separate doc for the JS function and cleaned up formatting in
general.