Code cleanup

master has some errors that are not all cleaned by this PR.

I'll try to investigate & fix them in a further PR before setting up the CI