Move confidence into stat
Make tasks immutable
Rename some variables for consistency