Change Command-Line history mechanism

I think it would be better, if we will have History like object, instead of simple array