changes to structure of javascript and pulled admin javascript to a new file, also wired up manage events to search faster