Small modifications to joefiorini's server code

@joefiorini Although it looks like a big change, I just moved some things around. Biggest change is probably that the server folder is now called middleware. Made sense because middleware didn't appear in the file name.