Moved tests from main file to test file