factor init function out; separate file for paper example

1 job for master in 22 minutes and 54 seconds (queued for 2 seconds)