Reworked the test functions to be a bit more maintainable which closes #5.