Better javascript separation