Cleaned up code and added jsdoc generation.

- Added comments and cleaned up the main index.
- Added documentation to transform.
- Added jsdoc to devDependencies and command to run the generator.