Add edit and delete buttons and refactor index view