Fix indexing and add verbose mode.