flight baysian updates. 

The code has been commented except the "hard" baysian method which i
coded that is pretty hard to understand even if i comment it. I can
explain it in person if need be.