Refactored to allow for no hardcoded urls