Model Theory I: Foundations