Library for B functionality