Factor out more code, adjust copyright dates and names.