added licensing information and cleanup