Minor code cleanup

small cleanup in the parseAndReplay func