Fixes for -Wunused-function