Moving delete button and adding confirmation dialog
Code formatting and minor refactoring.