Code clean up and silencing the static analyzer