Updated each_row interfaces and fixed serveral minor issues.