- more JS refactoring
- daily history now written at midnight