Refactored to make a frame class that will hold the game logic and
do most of the work.