DB changes and making the view talk to real data

DB changes and making the view talk to real data