added a game class, minor modifications elsewhere