Copied over the server from the squaredaway repo. Refactored all of the server-side code.