Well, it could be compactified a little bit but not speeded up I think, so I don't think there's much to be gained from re-writing this if it works now!