Refactor to OO Javascript

Add stuff