Consolidate the amount parsing/formatting code