Some unit tests + bug fixes, try using a different digamma implementation