When was the earliest medieval church founded