Rewrite hike using sstephenson/hike 2.1.3 API.
make code more readable

revert this commit if you're looking to improve performance