Move some statement preparations around