Added automatic compacting of database daily.