Did some code cleanup and introduced a unique_ptr for managing the servers.
Added some more forward declarations and did some small refactoring.