remove added linting expression no-use-before-define and fix resultin… …
…g errors. fix BugDB.js bug.