Some refactoring
Server files