Organizing code for text