Added further test cases. Refactored tested methods.