code refactor

refactor the code using javascript oop.

Todo: change audio to video
and start to work on the appearance
slider?