Add docco
Add docco comments to main.js
Merge latest from GitHub