Refactored gameCreation.js