Add packetManager. Removed several server functions

packetManager.h