Silence scope warnings

I was getting warnings on build about __AXUIElement and __AXUIObserver
being declared inside a method declaration. Moved their declaration out
to silence the warnings.

Also took the opportunity to update the project warnings