Implemented capabilities setting in views plus some minor performance improvement