Minor cleanup in the modules system