Add tests for BuddhaConfig, and fix bug with buffer offsets