clean up attribute getting/setting code

Renames "attribute" and "setAttr" properties to sourceattribute and targetAtribute, and sets them up in a more consistent way.