changes to database.js. 
Stored raw data in JSON files.