refacoring traits