PR feedback and add some test coverage