Refactored out the unit tests to make it easier to add to in the future