Refactor serial tutorial