Get rid of if/else

Per request: http://issue.cc/r3/2077