Add test cases; increase code coverage