Use a common function for getting the baseURL so that we can change it in just one place in the future.