Remove adding duplicates. Put all view elements in model object. Sort template
and material by name.