Tweeked setListHeight to make it more dynamic and reusable.