splitting tests to reflect new modules and some light refactoring