Update documentation
Fix array subscripting bug