reformatting per Miller's guidelines (tabs to spaces, line up curly braces)