Added a reference in lscomparison
Corrected a typo and refactored database.js