Code cleanup

ran the eclipse formatter and code-cleanup tool.
removed instanceof check as the object is already of the target type.
Merge pull request #21 from chetankothari/code-cleanup

Code cleanup