Fixing dictionary sort order and adding 5-16 test cases