Term Rewriting Systems with Restricted Variables