improved script and added locales and bash-completion configuration