Changed the Structure of the application

There is a slight change in the structure of the application with
additional DB code