Added tests to cover more code