Add trait support
Rearrange code, small change
Merge branch 'feature/github-pull-19' into develop