Shulchan Aruch Chapter 3: Using the Facilities ( 17 paragraphs )
REMA in brackets [ ]
1. When one enters the bathroom, he should say “out of respect for the honored ones etc...” but at this time it is not customary to say it. 
2. One should be modest while in the bathroom and one should not uncover himself until he sits down. [ Two men should not go in together. Also, one should not speak there. One should close the door behind himself because of modesty. ]
3. If one wishes to rub his opening with a rock or chip to open his bowels, he should do so before he sits down. One should not do so after one sits down because this is bad because of witchcraft
4. One should not uncover himself more than a hand breath behind him and two hand breaths before himself. A woman only needs one hand breath behind her uncovered and nothing in front. 
5. If one is excreting in an open place with no wall, he should be careful to face south with his back facing north or the opposite. However, it is forbidden to face east or west. [ However, urinating is allowed in any direction. ]
6. Similarly, it is forbidden to sleep facing west or east if his wife is with him. It is proper to be careful even if his wife is not with him. 
7. If one is urinating [ This is only referring to a place where one can see the Temple mount - Rashi.] he should not face the divine presence. One should [ turn north or south ] or turn side ways so he would not face the divine presence.
8. When one is excreting in a field, if a he is behind a fence, he may go immediately. In a valley, one should distance himself until he reaches a place where his friend will be unable to see his nakedness.
9. One should not sit down with haste or with force. And one should not force himself excessively in order to not damage the teeth of the bowel .
10. One should not use his right hand to wipe himself.
11. One should not wipe with earthenware because of the danger of witchcraft. One should not use dried grasses since any matter that is flammable  will damage the teeth in his lower bowel. One should not use a rock which his friend used since it causes a person to have diarrhea.  [ Nowadays, in our Synagogues where the lavatories are not in the field, it has become the custom to use (earthenware and it has likewise become the custom to use) flammable articles. No harm has come from using these things. Follow the saying “go out and see what the public practices.”
12. One should likewise practice modesty in the lavatory at night just as one does so during the day.
13. One should not urinate standing because droplets can sprinkle on ones feet. This is unless one is urinating from a high place or onto loose earth ( earth which is not untouched, but plowed land ). 
14. One should be careful to not take hold of his rod while urinating. This is only from the crown and onward because of unnecessary emitting of seed ( shifchas zera lïvatalah; this is forbidden ). An exception applies if one is married. However, it is a custom for the pious to not do so even while married.
15. Even one who is not married is permitted to support the testes.
16. Even a married man is only permitted to hold the penis to urinate but is not permitted to rub it.
17. One who holds back from using the facilities transgresses the biblical commandment of “and you shall not become disgusting.”
 Misha Brura (Chovetz Chaim) writes that this is a prayer to G-d that the angels who accompany a person should wait until he returns from the bathroom. We no longer say it since people are no longer presumed to be G-d fearing people who have angels accompanying them. The Sharay Teshuva writes that many authorities disagree and say one should say this. I do not know the complete verse. Email firstname.lastname@example.org if you know the entire verse so I can post it. Lightheaded people like to make fun of this section, however it says in Pirkai Avot that whatever a Jew does he should do so to serve G-d: "In all your ways serve him". Even when a Jew uses the facilities, G-d should be on his mind.
 Tefach in Hebrew. 3 or 4 inches. He probably means squared (4x4). It seems that the pants made at that time were like overalls where there was a flap on the back which can open up. I do not see how modern pants can allow only one tefach uncovered.
 Mishna Brura comments that this paragraph is only talking about if he is sleeping naked.
 Lit. “which the fire rules over.” Perhaps he means dried grass and similar things are sharp and abrasive. This is probably the reason why it is damaging.
 It spreads disease.
 This is because when castrated men urinate, their urine sprinkles. When other people see droplets on someone’s feet, they can spread bad rumors about him and question the legitimacy of his children. (see Mishna Brura )
 The small and large intestines contain projections called villi. They are not found in the rectum. These villi contain smaller projections called microvilli. These serve to increase the surface area of the intstines in order so that they are able to absorb a large quantity of nutrients. The Shulchan Aruch claims that certain activities can damage these villi. The Rambam states that understanding science is fundamental to understanding the torah (See Guide to The Perplexed).
Translated by Jay Dinovitser. Free for personal use only