Modified the way available width/height for piles is set. Before it was passed to arrangeCards function. Now you have to set it explicitely before calling arrangeCards.