Fix "if" style

Most "if" use the following style:

    if (...) {
      ...;
    } else {
      ...;
    }

So all "if" use the style.
Merge pull request #2 from kou/fix-if-style

Fix "if" style