Added most of the server side stuff for player sync.