Split JS into a separate file