Added support for modules. Fixes #10.