Removing unnecessary pages