Fixed some issues reported by jslint and made editor load sample file on start.