Tidied up old modal code from ssa.js