Refactor modules loader (draft). See issue #9