Moving main to tests.