Setup tests in main_test.py

Need to refactor some files
Refactor into easier to read parts