Fix static analyzer for functions, fix display typehinting errors, small fixes