Separated SQL functions into a module.
Separated updating into a function in update.php.
Automatic updating.
Falback if database is empty

An update can now be triggered with a request to index.php.