Refactor/trait and merit calculations