Moved everything into the OO api, not really tested …