Fixes for -Wall -pedantic
Switch from std::auto_ptr to boost::shared_ptr.
Closes #20