Refactored server stuff a little. Works
Moved server stuff to separate package