Language cleanup. Added some JS documentation.