Do not generate version.h until requested.
Code refactoring.

Make sure code is where it is supposed to be in the file.