Add window delegate, and implement close event on mac. Also set window resizable.