Preparing for rewrite in C