main instance no longer static, access modifier cleanup, various code analysis cleanup