tests: move all tests to separate submodules
chore: split types and functions to separate module files