Heavy refactoring, separate client and server packages