Tidying up and moving to event based running rather than all at once.