Initial commit for restructuring
Refactored to separate client and server concerns