Convert header/footer/body code to use uifiles memfiles.