Hat, you would be correct (I've read biographies of both). I would point out, moreover, that both were strident supporters of anti-religious-establishment - in all forms. As noted briefly in the Ujest's reference, they both advocated for the strict separation. Madison was responsible for getting the Virginia Statute of Religious Freedom, written by Jefferson, passed.