Implementing more of loop analysis.