Refactor JS code to be shorter