turned endpoints into a bitly class refactored to simplify the calls