Further simplify function analysis code