Fixed tests and did minor refactorings
Minimal process instance runs