Improve smilies scanner and put code to template file.
Merge pull request #1 from kidlab/master

Improve smilies scanner and put code to template file.