Remove unused references
Add/modify comments
Add option to send preformatted json payload
Add option to specify whether to look for https or not when checking for valid uri