Some pretty serious rewrites of some seriously clunky bits