Added boolean return values to methods.
Added more test cases.