Deduplicating code
Merge pull request #271 from alex-gh/autotraitor_fix

Deduplicating code