refactoring architecture
improved trait system