Use NSViewController instead of NSWindow + View