Refactor and remove open-uri/cached dependency