Fixed unit test.
Fixed some false positives in parameter not used issue.