added ability to remove unused statement in Resource