Tidy up checkout form code a bit