fixed problems with types, moved tests into submodules