added DatabaseInitListener class to initialize database, fixed the "no
database instance" issue from previous commit