Made testing work by calculating list length properly. Fixed an off by one error in add_cells