Added license and refactored to potentially support other CRMs with the same API.