mini module code cleanup

Not much change.