Move js from inline to file