Added language support. Misc fixes.