For 1), you must have owned the home for 2+ year to qualify. If you're moving under 2 years for a "qualified reason" (death, birth of multiples, 50+ miles closer to work) you can take a pro-rated deduction.
For 2), you cannot do a like-kind exchange for residential property that you live in as your primary home.
For 2), you cannot do a like-kind exchange for residential property that you live in as your primary home.