Implement AJAX and restful APIs

"Prettify" has not been implemented yet