cleaned up how baseUrl was handled.