restructure traits and tests