Added copyleft headers
Added test for #1289