Patched in remaining changes from new-view branch but it still doesn't work