Moved tests in main.c to test.c
Moved tests in main.c to test.c