Fixes for multiple definitions caused by function implementations and template specializations in header files.