Implement autoview and add tests.