Fixed compile errors. Fixed analyzer errors.