rpearce: Clean up a tonne of now redundant code