Refactoring to keep code in functions.
Refactoring: keep code in functions and use gon to load page-specific js.