'Merge' main.js from pure branch