Moves related resources out to template file.