clean unnecessary functions and variables, refactoring, seperate server to another class
hand merged changes from milo marcin
Merge branch 'mbartoszek-master'
(Had to hand-merge these for some reason. might have made a mistake)