Implements stage deployement and cleans up other stage code; adds tests

The next few tests all seem to use similar test data, is it worth pulling the test data out to save the duplication?