Add comments & minor code cleanup of index.js.
Cleaned up extensions and Browserify support. Fixes #61.