Visualize output of the model. Fix some bugs.