Added Smilies and refactored code