tidy up index.js (removed old notes, and sort out requires)