Manage button state, add delete handler