Sorting out modules structure