Refactor add/removeHeightToParent methods into one