Refactored template content handler; Only reload when template result changed.