refactored relation tree to use the new field types