First shot at making the whole thing "ajaxifyable"