Refactor TraitsSpec, use dsl