More serial code cleanup