Some code cleanups to avoid warnings with -pedantic