Rewrite ajax exercise in lab 4, and call it single-page application