Revert "Handle directories for modules"

This reverts commit 28bec16eaf78660164ca3d6691a52b7266a5d9f5.
Better handling of module directories