א׳ושמחת לפני ה׳ אלקיך. In Deut. 27,7, it says וזבחת שלמים ואכלת שם ושמחת לפני ה׳ אלקיך and the Sifri takes our שמחת לפני ה׳ also to express the joy of having a meal of peace offering with one’s family “before God”. Similarly in Pessachim 109,a, This is also the source of the general שלמי שמחה which are to be brought on all the festivals, and as here the demand is only made ושמחת so that it is only made directly to the joy of the meal at eating the offering and does not refer to bringing the offering, the bringing of the שלמי שמחה in itself is not חובה and can, if need be, be brought through מעשר בהמה and נדרים ונדבות whereas עולות ראיה ושלמי חגיגה being חובה are only to be brought from חולין.
ב׳והלוי וגו׳, the Levite is designated as בשעריך, he lives scattered in the midst of the other tribes each one of which was to receive a separate province, to which we have already referred above on Ch. 12,12. The cities of the Levites were not meant to be a concentration of the Levites. These cities themselves were scattered throughout the land, and the intention must have been for the Levites to live also outside their cities amongst the rest of the population. Of the stranger, orphan and widow it says בקרבך (who are among you I.L..), they miss being attached to families, and this is to be made good by their being adopted in your midst. What we said above of the Levite applies here also to the stranger, orphan and widow. They must have been taken with the families pilgriming up to the City of God to the celebrations of the festivals there. Their participation in the family festive celebrations belongs essentially to those festive celebrations, and the following וזכרת probably refers quite specially to this.