Fix warnings (shadow and unused), update copyright.