Add compiled view caching.

Also cleaned up some compiler exceptions.