use the compiler option -std=c++0x conditionally
rename 'set' variable and do some minor coding style cleanup