Change semantics of ::toWhatever() functions...

Instead of saving results into target passed by reference, return them
from function in a standard way.