some fixes and oo changes