Bug 958782 - 2.c/3: remove unused headers and sort.
Bug 958782 - 3/3: fix test cases.