new csim using red-black-tree.

initial test commit.