cleanup, bug fixes and added timeout on player inactivity
bugfix for duplicate players on reconnect