#50

Unit tests now done and passing, now need to write some integration tests.