Updated to B functionality

Lots of user input and I still need to debug.