Consistent whitespace formatting for if() and for(), indentation fixes

@justin: pls wait for confirmation