Remove unnecessary public function.
Use spies instead of custom code.
Factor the render func into a separate func.

This way the try/catch won't disable optimization of the entire function.
Remove redundant assetions.
Improve documentation.
Merge pull request #1674 from AnalyticalGraphicsInc/widgetAndViewerImprovements

Widget and viewer improvements
Merge remote-tracking branch 'origin/master' into performanceMonitorWidget
Error handling improvements.