Repair indentation
Make variable local; consistify indentation.
Whitespace adjustment.