Tidying up example mamalistenc and add some more unittests.