[Gnu] Move code from .h to .cpp.

No change in functionality.