Comment height calculation out and cleaning up some unnecessary work in layout.
Merging.