merged strip_attribute code and tests