whitespace and code readability fixes