Refurbish as_size function

Made as_size a non-dispatched function.
Updated usage accordingly.