This should be removed, even if it duplicates a small amount of library code (the amount is trivial, I think).