Add viewClass option

Implements #5.