The Matte Routine