Cleanup SortedMapping<> and added assertions