Refactored server class
Refactored server, added console listener