Added multi-language support and fixed some bugs