Updated to object orientation C ansi-style.