Sort files into modules.