Regarding yichud, my brother is coming to town, can he stay in the home with my wife if I am in the same town but not at constantly at home. Also, if I go to a wedding around 20 minutes away but in a different town does that change the halacha?
Answer:
In principle, the prohibition of yichud does not apply when the husband is in town. However, if the person in question is close to the wife (libo gas ba), because of family ties or friendship, the heiter of the husband being in town does not apply (see Shulchan Aruch, Even Ha-Ezer 22:8; Chochmas Adam 126:6; Aruch Hashulchan 6).
Usually, a brother-in-law will be considered libo gas ba, and being in town will therefore not help for the prohibition of yichud.
However, you don't need to be constantly at home, and leaving for a short interval, where you might actually come home anytime, is fine. If you have to leave for a long interval (for instance a wedding), the front door (facing the public domain) should be left ajar. If this is not possible or convenient, an arrangement can be made with family or neighbors to drop in now and again during the time that you are out.