Refactor Ajaxify