copyright attributions and some cleanup