Actually, there's a reason for how this was done: performance. We originally used a method, but discovered it was creating a huge bottleneck, as method calls are orders of magnitude more expensive than having the conditionals inline.