Code cleanup in series tests