lots of fixes after trying to make Sreejith a SMART template.