more reformatting (tabs to spaces, lining up curly braces, explicit curly braces)