Better modules decomposition (fixes #90)