Added modular tests.
Revert "In progress refactor"

This reverts commit 938f253036c3fb8dc6ddc93f2060a75580b1b995.
Revert "Revert "In progress refactor""

This reverts commit f4ba0277dd49514095cd910a8d4db385607eb016.