Move import code into repo object