Use new protocol for creating dynamic classes