Added new functionality to ActiveRecord and helper functions.