Remove main function. Add testing.