Finished porting APIs (sorta), ported over cronus.