Some corrections in code and index.rst documentation