ajax_demo: Modified Code to follow guidelines