What's this big bit of un-prettified code?