Add headers, various other fixes