Modified test case descriptions and test cases for one function

Also fixed a small issue in orderedKeys function in lib. Please review it.