Adding support for modules, still missing tests...