Fake server's code refactoring