cleanup and add copyright information