Fixed junction bugs and added probabilities
Final commit