Commiting new project structure

All the database transaction related logic has been seperated from the
view.