Added error handling to Salesforce calls and cleaned up the code and com...

...ments.