Fix tests and address comments