Refactored tests all pass