Classified ajax functions under a single function