Created some resizing logic.