Bayes finished

Fixed errors, now uses doubles correctly.