Wrote very basic recursive analysis functions.