Convert accuracy to use S4 class.