added view vizualizer and code clean up