Compile with -Wall and remove some warnings