More re-implementation done.