Fixed insert_encoded_elements char bugs.
IndexCounter class and initial Cursor classes.