Refactoring. Created main class for test in server.