tidying  up js

tidying js into 1 file