better copy, minor fixes, cleanup