Clean up window listener code and make sure it works on OS X
Clean up window listener code and make sure it works on OS X

bsmr-clojure/Nightcode,oakes/Nightcode,Immortalin/Nightcode,Immortalin/Nightcode,Immortalin/Nightcode,bsmr-clojure/Nightcode,oakes/Nightcode,bsmr-clojure/Nightcode