Rearrange the sections a bit for clarity
Fix a typo in NumPy indexing