Made viewdir and views togglable.