Code improvements

Multiple code improvements (mostly to constructors) suggested by
Cppcheck