Total rewrite in progress.