Cleanup of locale handling