Cleaned up to prepare for embedded branch focusing on support for
parallelization and process persistence.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>