Move view ajax handling to actions