Removed redundant code

Removed redundant code.
Added some comments.
In process of adding more support for locale switching