Re-implement with function_expansion module

Let that module handle all the gritty details about rewriting terms.
This module can focus on the simple goal of multiplying a few decimal
places.