Some cleanup and updates of the object.py file.