Fix tests and import