Fixes: a) declare functions before the first time they are called

b) fix a re-definition.
Merge branch 'master' of https://root.cern.ch/git/root