Some refactoring and documentation for Bitap classes.