Added Exception & improved index ajaxDemo