modification of sldisable (now it deletes the search)
small reformating of the code