Clean up task engine serialisation.
Minor cleanup.