Working on porting the legacy code.