Class function

Add class function support.