Added some window listening functionality.