Added javadoc and fixed bug in BBRSI