Adding a main with tests.