added probability-functions.js to relevant templates. Fixes #146