Added JS Object output for calculation fields using wp_localize_script. Code cleanup.