Much work, see desc.

~ Update internal data on every change.
~ Implemented operations
~ Insert, move, remove, etc.
~ Fixed destruction removing data by wrong id.