Refactor ajax calls to use data instead of hard coding params in urls