Added test cases. Ready for submission.