Bit of refactoring. Make js more class-y
Bit more refactor. Trying out class extension for js