Wrapping Up the CostUpdater javascript