Minor formatting changes. Comments added for error indexing.