Minor code fixes
Added text template