Use view.replace rather than insert when appropriate. #200