sorting sections by class

deleting the last book in a section sets off problems