Minor changes: added consts and replaced BOOST_THROW_EXCEPTION with throw_exception