Object factory and ActiveRecord refactoring draft