Refactoring and first server implementation.