Refactor trait structure