tidy up save.js to keep codeclimate happy