Use std::make_pair, rather than the std::pair contructor.
Use google logging instead of assert.h.