Improved always-on-top window detection. Cleaned up some old obj-C code.