More refactoring to figure out the curl options.
Updated Implementations to support refresh tokens. Also did a little cleanup