Code inspection cleanup and fixes