Attribute code duplication clean up