Cleaned up and documented view api.

Change-Id: I282a32e67215cd4e3f7c77352018b6fe442d48f4