2.3/dev Fixed Pages tree sorting and deleting

Soon i will send another PR that fixes duplicating pages with their entries.