Add main script and update component.json