You should feel comfortable yet challenged at your program, so fit is important. Judging fit by your interests, however, is a questionable strategy. Many students change their research interests after the first year or so of graduate school or find that there is enough opportunity to interact with faculty on other campuses (conferences, summer fellowships, email exchanges, etc).
Rank, for better or worse, is important, though that importance fluctuates with your own aspirations. Look up a few schools you'd be happy to be employed by in the future and check their academic faculty listings (putting more weight on more recent hires). Where did they get their degrees?