Refactor some core pieces of chef_objects.