Make OOP wrapper (and its generator).

It has some problems, but it starts working now.