Some middle stage work... also now compiling with -std=c++11 -Wall -Werror