Update view-generator.js

Minor cleanup in viewgenerator