Finalize code, ready for testing.