some clean up in the existing code and add the first bits for an OO interface