Making awkward code more inline