Restore functionality broken in pull request #245

fix typo

fix failure to act on item selection with root person drop down menu

(re) fixed previous/next arrows on chart in module

Tidied up JS formatting