annotated demo js with TODOs