added comments, ability to embed js in html, and fixed $