Revert "refactor"

This reverts commit 9705803fa68fd7802c8e602e1385faa71b102388.
Revert "don't use open-uri : close #1"

This reverts commit 4c7f69384842bdcd9453ea5718f7d46855675c67, reversing
changes made to a81276b621637829508ab4259eb94d718e0e69b5.