Change return value of StateLocale to array reference and improve indentations