update copyright info and clean up code