Remove unused code and sort variables declarations.

PR:		kern/181822
MFC after:	1 week