Modified app to interact with database.