What is a block index in blockchain.info?

On blockchain’s blockchain api documentation, located here

https://blockchain.info/api/blockchain_api

There is an api call that uses a parameter called block_index. What is this value, and how does it differ from block_height? From playing around with changing the block_index value in the following api call:

https://blockchain.info/block-index/$block_index?format=json

It seems like (imo quite arbitrarily, which adds to my confusion) that block_index 14849 corresponds to the genesis block. Finally, on the api page listed at the top the first example output they show gives a block whose index is 818044, yet when I enter the following api call into my browser’s address bar:

https://blockchain.info/block-index/818044?format=json

I get “Block Not Found”. Is this just a bug in blockchain.info that the example output they provide doesn’t actually work, or am I using block_index incorrectly?

How to generate a bulk wallet offline with python, java or c++?

I want to generate, say 100000 key pairs (address/private key). It should be done offline, without using websites/javascript , with a program on the command line. Of course, the software should use the best way to generate randomness. There is such function on https://www.bitaddress.org , but it’s javascript and is not easy to be used by scripts on the command line. Do you know of such software?

Bitcoins being sent to another addres during a transaction

I realized a few days back, that if I send some bitcoins to someone, then it shows in blockchain an extra amount sent to my own wallet. So if I send 0.5 BTC from wallet A to B then blockchain shows

A--> B 0.5
A-->A  1  (basically sending it to my wallet as well.)

Today I noticed a different wallet address during a transaction. So it was like

A--> B 0.2
A--> C 0.5

Checking address C on blockchain, it gets sent back to A in some time. But since this morning, the bitcoins haven’t come back to A. If I open my wallet on multibit, it shows the correct balance. However on blockchain, it’s 0.5 less. The funds from C have not been sent back to A, but it shows on multibit the right balance in A.