Some refactoring of the server

moved the sourcebox_server class in a extra file.