First pass at autoclose.

24-module.t now passes.