Added update and deactivate
Added debug