removing unused variables. stick to underscore-less naming conventions. correct debug logs, log contextual errors.

removing unused variables. 
stick to underscore-less naming conventions. 
correct debug logs, log contextual errors.
Fixed. I suggest that we use final constants defining these errors and group them into Enums based on different error types. Earlier, we did not have such comprehensive error handling therefore this would have been overkill. But we need it now. 

Added jira for tracking : https://wso2.org/jira/browse/MB-881