Fix auto detect source language; fix countries list; refactoring code