minor cleanup
interim commit, first round of removing mallocs from text.cpp