VE-161: linting
VE-161: refactor so that license API is only called when needed; cleanup (mostly whitespace).