Performance improvements for org.to_dict