code maintenance
code refactored
JS code moved to a separate file
confirmation added to the delete function