Started js refactoering;