Corrected window resizing, cleaned up debug comments.