Made cleanup lib into an object that needs to be instantiated.
Updated test.