Tidying up js
Tidying up js