Refactor server code
Refactor server code
Merge pull request #9 from loringdodge/serverRefactor

Server refactor