refactor a lot of the project structure to obtain a clear break between client and server side