* comitting current status since I'm going to refactor the js
Refactored JS, at least a start for it.
I'm not sure if I don't regret this...