Refactored the test so that it created its own server before running and shuts down the server after running. This makes it easier to run the tests because you don't have to have the server running somewhere else.  Also did some refactoring in order to make it easier to start the server via the tests.