More cleanup and simplification

Simplified exposeAttributes, simplified targeted id/class removal, fixed
a minor bug with getting attributeText twice in scoreElement, added some
more comments to transformDocument