Split javascript into multiple files since it was getting too monolithic.