Lots of bug fixes for custodian.