Adding test cases and sorting the new code correctly.