Major refactoring of tests folder