Refactored server structure into separate files