refactored ajax manager service so that it can return base URL without prefix or suffix