Sort modules.
Add clean() for errors.