More refactoring of the helper files
JS helper WIP