Added module support.

Updated tests.