To purchase this Sefer, click here
How well must one clean oneself?
A. Bowel Movement: 
Prohibition of learning and praying: It is forbidden to learn or pray if there is any amount of excrement which remains by the area of one’s opening. This applies even if the area is covered by clothing. It is only forbidden if the remaining excrement can be seen by others when one is in a crouching position, hence widening the opening. If however the excrement is not visible at all when one is in this position, then [even if excrement remains in the inner cavity of the rectum], it is permitted to learn and pray. All the above refers to the actual person, however it is permitted for other people to learn and pray even if they are in presence of a person that has fecal remnants by his opening, so long as it is covered.
How well must one clean? Due to the above, one must be very careful to clean the area well after a bowel movement. One is to clean himself in a sitting position to the point that there is no more excrement seen on the material that he is using to clean. [One is not to clean himself past this amount, as doing so can cause damage to the rectum and is thus forbidden.]
Using water: In addition to the above, it is an act of piety for one to wash [his opening] with water [if this is achievable]. [When cleaning oneself with water using ones hands, one needs to beware to only use his left hand to do so.]
If upon [a man] urinating drops of urine fell onto his pants or shoes, he is required to [immediately] clean it off prior to returning to the public. [One may not urinate in an area or in a way that many drops will fall on his feet to the point that even if he were to wipe them away their trace would remain.]
The prohibition of learning and prayer: If one got urine on his clothing, then if the urine is Tofeiach Al Menas Lehatfiach, one is to dab it with water in order to be allowed to pray and learn. On Shabbos one may not dab water onto it although he may dry his wet hands on the area. If the urine is covered by clothing then it is permitted to pray even without nullifying it with water. Nevertheless pious Jews are careful not to pray with any urine on their clothing, even if the clothing is covered.
It is forbidden to learn or pray with excrement by the opening. Therefore one must clean himself to the point that there remains no visible excrement by the opening. This is verified when the paper comes out clean after wiping in a sitting position. One is to be careful upon urinating that the drops do not fall on his clothing or shoes.
If one Davened with fecal remnant by his opening must he repeat the Davening?
It is possible that one is required to repeat the prayer. Therefore one must be very careful to clean himself properly.
 Based on: Basra 3/8; Kama 3/25; 76/6; Siddur Seder Netilah: “One does not have to clean deeply inside the opening as excrement which remains by the opening is only problematic for prayer if it can be seen when the person is sitting, and thus the opening is open. [Nevertheless] it’s an act of piety to clean it with water”
 76/6; Kama 3/25; Siddur ibid; Michaber 76/5; Gemara Yuma 30a; This is called in Halacha: “Tzoa Bimikoma Bimashehu” Tzoa that remains in its area of origin forbids learning and prayer even if it is a small amount. [ibid] Regarding whether this prohibition is Biblical or Rabbinical, see Chayeh Adam 3/6 who concludes that it is Rabbinical.
 76/6; Michaber ibid; Although there are opinions which permit praying and learning even if one has feces on his skin, if it is covered by clothing, nevertheless regarding feces that is in its area of origin, which is defined as the rectum, everyone agrees that it prohibits learning and prayer. The reason for this is because the feces that are in this area are overly abhorrent being that the area is warm and it receives no air thus causing its smell to remain conserved and not spread. [Admur ibid]
 Siddur ibid; Basra ibid; 76/6; Michaber 76/5; See Ashel Avraham Butchach 76; Kaneh Bosem 1/7
To note that in Admur 76/6 he writes this law in the following wording: “It is problematic if the feces is visible when a person is standing. Furthermore even if was not visible when he is standing but is visible when he is sitting it is problematic”. Vetzaruch Iyun Gadol as to why Admur decided to write such a superfluous wording that it is forbidden when seen while standing, if in truth it is even forbidden while sitting. This is especially wondrous in light of that he changed from the wording in the Michaber ibid. Vetzaruch Iyun. To note however that it is evident from the Gemara ibid that having it seen while standing and sitting are two different levels of Issur.
 76/6; Thus on Shabbos the Sages only allowed using Muktzah stones of wiping until one has cleaned himself to this point. He may not take a Muktzah stone to wipe himself any further than this. [Basra ibid; Siddur]
The reason: As the Torah was not given to angels. [76/6 based on Gemara ibid] Meaning Hashem does not demand the impossible from His creations and it is not humanly possible to verify that there is no excrement remaining in the inner cavity of the rectum.
 76/6; See Kaf Hachaim 76/28 that from M”A 81/1 it is implied, unlike Admur, that even others may not pray, and so rules Machatzis Hashekel and Yeshuos Yaakov. However the P”M 81 A”A 1 seems to learn like Admur and so rules Beir Heiytiv 81/2.
 Kama 3/25
 See next footnote
 Basra 3/8; As this is a sign that there is no more remnant of excrement by the area of his opening that can be seen when sitting, as now he is also in a sitting position and the material came out clean. [ibid] However in a standing position it is difficult to ascertain that one has cleaned all the excrement that can be visible when he is crouching. For this reason it is preferable to wipe while sitting.
Three wipes: The Divrei Chaim 2/9 writes that based on the Gemara Shabbos 81a, from the letter of the law one is only required to wipe three times and not more [even if there is left over]. [See Piskeiy Teshuvos 76/7; See Kaneh Bosem 1/7 who analyzes and defends this ruling concluding that this can apply even according to Admur]
 See Kaneh Bosem 1/7
 Basra ibid; Kama ibid; Siddur ibid; based on Siddur Haarizal, brought in Beir Heiytiv 3/16; Soles Belula 3/8; Ben Ish Chaiy Vayeitzei 11; M”B 3/31; 76/18; Kaf Hachaim 3/35; 76/26
 Basra and Siddur ibid; However in Kama ibid the wording is: It is good, if possible, etc, and so writes M”B 3/31. The Beir Heiytiv ibid simply writes that one is to do so, and so records Kaf Hachaim 76/26. This is based on the Arizal which seemingly learns that cleaning with water is an obligation as he learns it from the verses “And from your feces you did not wash”. [Piskeiy Teshuvos 76/7] So also writes Ben Ish Chaiy ibid that this is the main form of washing and one who does otherwise, as is accustomed in the Edomite regions, is improper. Mishmeres Shalom 1/7 writes one must wash as it is not possible to clean properly without water. However in Siddur Haarizal of Rashar it states “It is a proper custom to follow the Sephardic custom to wash with water as the verse states…” hence implying it is not an obligation even according to Arizal. Practically it is customary of Chassidim and meticulous Jews to be careful in this matter. [Mishmeres Shalom 1/7; Shulchan Hatahor 76/1] Some suggest slightly wetting the toilet paper and in this way one accomplishes the cleaning even according to this opinion. [Oar Letziyon 2/44]
 Basra ibid
 Alternatively one may use saliva. [M”B 3/31]
 Kama 3/25
 As stated above regarding cleaning oneself with ones fingers.
 Kama 3/20; Basra 3/10; Michaber 3/13; Ketzos Hashulchan 4/4
 Basra ibid
 As otherwise it appears that he is impotent and therefore he cannot urinate properly. This causes people to rumor that his children are not really his. [Kama ibid] Some Opinions say that today that we wear pants this law is no longer applicable as the urine becomes absorbed and is not noticeable. [Birchas Avraham brought in Piskeiy Teshuvos 3/7 footnote 46] However the Kitzur SH”A 4 and Ketzos Hashulchan 4/4 record this law without change.
 Kama ibid; M”A 3/13; Thus the Michaber ibid writes that one may not urinate while standing unless one does so into sand or into a lower area. Alternatively one can urinate standing and direct the urine through lifting up his scrotum from below. [Basra ibid]
 This means that the clothing is wet enough with urine that it can cause a second item to become wet enough to wet a third item.
 Ibid; 302/21
 Chayeh Adam 3/2; See Kaf Hachaim 3/35; 76/27; M”B 76/17 [rules must repeat]; Kaneh Bosem 1/7