Fully refactored ItemDefinition and ObjectDefinition. Minor refactoring of other things.