Added js localization and some bug fixes.