Refactor overlay resizing.