Added pageCount in PDF processor + small cleanup