Finished porting, started test cases. Metrics added