Factor layout and element out of constructors.