Automorphisms in Birational and Affine Geometry