Refactoring project structure with a server and client directory