Fixed class definitions to use object.