Looking far more complete now after a proper re-factor.