cleanup and add comments to code.js

Cleaned up some commented out code and added some new comments and
TODO: comments