Refactor definition_file instantiation