Reorganized classes for attribute serialization.

Changed some depending classes accordingly and did some code cleaning as well

Documentation has been also edited to reflect changes in the way elements are displayed, since that has been affected by changes in the text serializer.