Refactored JS. Reordered plugin's initialize plugin to work with debounce