Migrated ajaxGetJSON to main.js

Still need to update remaining calls accordingly