Removed hardcoded urls from ajax api calls