Update bpe_base.c

Fully working base implementation.