added preferences (including hbang pane), altered method of alert handling to work externally