Doc fixes and inline type hints for variables (big static analysis cleanup)