refactoring text heap ideas.