throws error when trying to insert root view that is already rendered
remove more dead code