Refactored to have only one line in the before_finish block
Added missing spaces
Call the #analyze_object method directly here
Renamed method to fit better what it actually does
Added debug calls for the metaprogramming stuff