Ported more methods to C