Features addition, bug fixes, improved documentation

Here is a better version for the BB repository.

Thanks.