use corpus_ref for determinig text_ref and prepare not using component_id any longer