Initial commit of existing process engine, needs tests and is not
decoupled yet.