Many changes. See description.

Restructured code into a usable package.
Moved example to example/main.go.
Fixed GetRequestUrl function.