Also add missing file header and fixed code to used nested namespace for definining the anchor function.