Add 'static' where able.
Correct check to see if file changes.

Reported by:	swildner@DragonFlyBSD.org
Reviewed by:	des
Remove unnecessary #include's.