Refactored field and attribute definitions to be called just 'types' because definition is pretty weird concept.