Moved database creation to main method