Added support for duplicate attributes, pretty print output and better styling.