Remove duplicate headers.
Merge pull request #164 from ahmedcharles/duplicate_headers

Remove duplicate headers.
Fix warnings.

One instance of a unnecessary switch statement.
One instance of an unreferenced parameter.