Add new functions for creating, cleaning and destroying handles
Move example functions to bottom of file
Use proper typedef instead of int in function return types (this allows the compiler to detect return values outside of the enum)
Move curl callback
Use new handles and add separate function for processing requests without allocating new handles

Breakout URL expansion into a new function

Use handles for storing expanded URLs

Breakout nonce generation into its own function

Only build user_agent string once on initialise