move js in separate files