Improve collect modules

This advice is given by sugyan.