Refactored ActiveRecord plugin to use new plugin registration