Separate js into 3 files