declarations and constants out of bb.c and into bb.h. Also re-alphabetized the functions and updated the docs.