Got rid of HtmState mess.
Visualizer added and cleaned of hacks.
Basic visualizer tests added.