Converted the macros to class methods.