Vivek model db rebased wps view

Hi,

Please pull this branch. This contains Mike's changes and Vivek changes of model on db. This has been rebased to WPSView. Should it should apply relatively cleanly.

There were quite a few conflict during rebase. I am not sure I have resolved everything
correctly. Once we pull in this branch, everybody will have common view and we can start doing the bug fix.

Vivek