Finish refactor / test coverage