fixing error in sample_files.js, auto-formatted some code