Adding default locale discovery and improving structure.