Add copyright and license where it makes sense
Remove debug code