Refactor of all unit tests; complete