some more housekeeping and cleanup