Refactored to use single erb file. And use template yml
Merged latest changes. Resolved conflicts.