Moved game related javascript to seperate files