More test coverage and edge cases