Attribute stuff

Added inserting and updating of attributes