Move analysis to own library.