Added inputs for adding origins and destinations

Added some inputs for adding origins and destinations and a list for
list each.

Javascript was moved to a util.js file.
Moved Javascript code to util.js

Moved all Javascript code from index to here.

Refactored some functions and added new functions to handle origin and
destination adding.