Adding DB stuff, making main app refer to DB stuff