server refactoring (creation of classes for game entities)