Refactoring local JS. Added mustache lib.