Some minor changes. Added Utils class and db guard utility function that runs a callable guarded by pdo transactions.