Replaced DM with ActiveRecord