Minor modifications.
Added a function to find "definitions". Added a Switch pattern to refact ruby lambdas.
Minor tweak.