move compilation logic to TraitBuilder
0.3.1