Add a location using JavaScript; IIFE pattern

* Using IIFE JavaScript design pattern
* Reset form after create location