Cleanup preprocess tools.
Fix issue with closing #if blocks.