Just porting a little more code over.
Porting a few more functions