Some code commonised and commented as such.
Database creation includes "if not exists"
Using databaseinitialiser.