Add ajax and callback functions to support answer validation