Layed out API for new OOP version. Old functions still in place