Fix all static analysis findings except cyclomatic complexity ones