HTML alerts support, AjaxAction timeout fix, some refactoring and fixes