Fixing deprecation notice and updating to instance vars in templates