views refactor

Re-factors the views into separate modules in preparation for v3 API changes (see #1).  Separated dependency calculation logic into its own module.