Put in some assertions and made bpt_print use the cache
Node cache improvements