Various small fixes

kill some warnings, reshuffle some headers, ...