Many bytesize improvements based on cppcheck analysis