minor refactorings and bugfixes for serial processing