Compiles, one segfault rectified, main.cc file changed to proper init.