Added functionality for browser resizing