Do some general housekeeping