Renamed minimalHeight to preferredHeight + some adjustments