Started re-implementing the visualization system in typescript. Also fixed the failing unit test.