tidying up and modal.js