cleanup analysis.[ch] code