Enhance/refactor to lib wikitor