Most recent preference changes
DRY'ed up select statement
Database stuff