added buttons for switching between views
added click events and removal of svg elements from dom