[IMP]Improved template and methods andd destroy session variables after completation.