Refactored project to use ActiveRecord