Initial implementation of attributes in Surfaces
cleaned up logic and merged with head of master
added a error check for style changes in setAttributes