reposting bottom half of main-js

to resolve the earlier conflict I removed the bottom quarter, so now
i’m adding it back