Code cleanup and enhancements of Pdf Annotations