Added DB functionality to the application