adds the text format and removes extraneous includes in the frame code