Nothing ever works
Refactor a bit
Now using boost smart pointers instead of c++11 smark pointers