Refactor to use default endpoint constant.

Simple refactor to use the ENDPOINT variable in the code. Unfortunately, I couldn't find a usable solution for passing in an "endpoint" argument to auto-generate the defaults.

Addresses #1 
~ Jonathan