Minor cleanup

Minor bug fix + chaos-demo.js cleanup