refactored price conversion code out of dom into core