Move JS into own file