made modules dynamically importable, refactored tests