Migrated code to match BASIC_MERKLED_API updates