Fix extend leaking global

* extend is no longer global
* add extend to all tests