Fixes for GCC compiler errors and style fixes.