Updated documentation, fixed a bug in gibbs.cpp