fixed indexing bug; also rearranging and made more comments

1 file changed