Converting wrapped functions to classes. Updated tests.