Evil, evil four-space tabs?

I can't think of any obvious optimisations to the logic, and it's clear to read.