Add license headers, remove debug code