did some more refactoring and implementation of the server and AI clients