Code cleanup (fix all gcc -Wall warnings)