separate ajax handling to modules