refactored gameboard. Added back key functionality