Separated the master server code from the GUI to its own object. Fixed some threading issues.