Added code for window resizing and getting size information