There's still probably stuff broken, but this seemed like a good spot to commit. Sorry for the enormous chunk of code. I was attempting to update the views, but found that I needed to update a few things elsewhere as well to make them work.
Not going to make any claims for other views though! About to test them next.