Finished porting most of code
Finished porting most of code