Refactor ajax functions on expsum view