foreclosure questions

Thinking about the whole mortgage crisis and I realized that there were a few things I was curious about.

Let’s say Company A sells a mortgage to Company B and later Company A tries to foreclose.

a) Does it matter if the person being foreclosed on is in another state? Does that change the venue to a district court?

b) If Company A does try to foreclose under these circumstances, are there grounds for a countersuit like violations of FDCA, fraudulent practices (not holding the mortgage, etc?

Why would Company A attempt to foreclose? They aren’t the lender anymore. Foreclosure’s aren’t free. Why would Company A seek to foreclose on behalf of Company B, unless they are contractually obligated to do so, via the sale of the mortgage?