Small fixes

Most of them are to reduce warnings in testing builds.