Refactor loading code to use related field.