JS subtotal calculator should now work properly