Add apache2 header

and do a bit of cleanup