Converting classes to CustomAttributes