Added in locale variables and shuffled comments slightly.