Minor fixes.

Use empty vars instead of 'new'.
Minor changes.

BOM removal by Brackets.
Insert <img> for image emoticons, instead of em codes.

But the old em code is conserved, for possible compatibility issues in the future.
Use global object currentInput to store box, container, and support for <img> emoticons.