Changing the method for removing div from remove to empty