All parts of the app are now using the same method to retrieve the endpoint