Add documentation and remove dependency to BRandom

add documentation for everything (hopefully)
begin to create better tests