Cleaned up JS file, added comments, added some code