Remove in_transaction from SQLite query; prevents error when attempting to access a read-only database file
Tidy up call to ->connect()