GCC 4.7 fixes & clean up