Added a lot more test coverage