A unit test + some changes