moved game javascript to proper location