Adding some code to js/main.js to clean up bad data assuming some defaults