big cleanup to remove unused code and update copyright notice