Added code to clean views and subviews