Transfer to OO

Transferred most of the functionality to a new OO version, still have
to figure out the best way of fitting things.