Break out enqueuing into into its own function.