Implemented ajax over most functions