Made sure to free up resources at the end of program. Removed rtf.