Added in the extra parts to the challenge and put the whole thing in a game loop.