1.3.1: cleaned up exceptions thrown and issues found by VS Code Analysis.