Refactored server to start seperatly