Imported definitions in a module, fixed #349.
Fixed tests.