* removed else branch in B_GetNext
* moved the assert to a place where the base pointer is used
* reduced scope
* typos and doxygen fixes
* reduced scope and cyclic complexity