Added my bugfixes and removed the triggerAjax and handleAjax functions since they are no longer needed afaik :)