Add freelist test.

Change-Id: I02dcb15b6d5fd6900a1956399d876ddd30239d34
WIP. Fix op leak. Add tests.

Change-Id: Iee21c8ca5edbade24bb807156bf7bb53dff0bd52