Cleaned up documentation, fixed convergence issue

Cleaned up the documentation of the code
Fixed issue with convergence
Merge branch 'cleanup' of github.com:rzlee/bayes-detect into cleanup