Fix tests, add _save function