Replace deprecated GenericReference* by Reference*.
Fix headercheck some headercheck issues.