Porting some more functions.