Added ActiveRecord base code