Updates to API url abstraction based on @garyj suggestions.