refactoring directories to separate client and server components