Added code to make the UI more responsive.

Added code to make the UI more responsive to window resizing.