Simplifying Realistic Programs Of thaifriendly