Refactor repetitive code. Adding task to update js files.