Refactor code: /js/express