Increase code coverage and add more tests