Added error event
Added options for adding vias and dragging vias. Refactor.