Fixes from review

Change to 0-based and many other little changes suggested
by Christina.