ajax implementarion and refactoring

adding ajax delete implementation and refactoring include javascripts