Added per-project synchronisation and massively refactored SQLiteWLDatabase.