Start refactoring.
Refactored JSV, added jsdoc.