Move Javascript to separate files