added set_lang method & code cleanups