Add 'append' parameter for 'to' injection. Rename local variables for clarity.
Fixed issue with create() when scheme not provided. Thanks unintendedquine for the original patch.