Refactor traits, improve layoutParams macro