Tidy up the code so we only call execute one way