Merge branch 'refactor_likelihood' into 'revision'

refactor likelihood building

See merge request !2
2 jobs for revision in 15 minutes and 40 seconds (queued for 2 seconds)