Lots of bug fixes, refactoring of views into managed code