Code cleanup and copyright update