Extracted logic into .js
Updated instructions