remove regions and comments