refactor populate rake task and add make_relationships to it