Js refactor

Update comments for function - but yes let's of course remove a silly parameter that isn't in use :-D