Improve analyzer: static checks (classes, methods, etc), fixes