Tidy up the code in issues.js