Minor refactoring to chargeTo.js