Prepare to fix patches after Marcel Code-Review.
Fix cppcheck bugs 8 and 9 - Reviewed by Marcel
Fix cppcheck bug 3 - Reviewed by Marcel
Fix cppcheck bug 6 - Reviewed by Marcel