cleaned up js
refactored deletion handler out into module to dry up code, made minor adjustment to ajax function to handle connection appending without extra logic