Namespaced JS-functions to easily customize them

Fixes #2691
Refactored frontend JS CamelCased

Fixes #2691