changed how listener and handler are closed, added method to handle
network errors. extended GameState