Fixed row numbers to update after addition/deletion.

Starts from 0.
remove extra whitespace.