Server side refactoring #4