Cleaned up code. Added close feature after game ends.