A controller for hydraulic system of a work machine, the controller configured to perform a worktool disconnect routine to reduce pressure in a first worktool line and a second worktool line of the hydraulic system, wherein the hydraulic system comprises: a spool valve; a first worktool port connected to the spool valve by the first worktool line; a second worktool port connected to the spool valve by the second worktool line; a high pressure flow source of hydraulic fluid connected to the spool valve by a high pressure line; a low pressure tank line connected to the spool valve, the low pressure tank line at a lower pressure than a pressure of the high pressure line; wherein when performing the worktool disconnect routine the controller is configured to: check that a power source of the work machine is operating; instruct the high pressure flow source of hydraulic fluid to provide no flow of hydraulic fluid in the high pressure line to the spool valve; instruct the spool valve to move to a first position wherein the first worktool port is connected to the low pressure tank line and the second worktool port is connected to the high pressure flow source in order to reduce a pressure in the first worktool line; and instruct the spool valve to move to a second position wherein the second worktool port is connected to the low pressure tank line and the first worktool port is connected to the high pressure flow source in order to reduce a pressure in the second worktool line. wherein the hydraulic system comprises: a spool valve; a first worktool port connected to the spool valve by the first worktool line; a second worktool port connected to the spool valve by the second worktool line; a high pressure flow source of hydraulic fluid connected to the spool valve by a high pressure line; a low pressure tank line connected to the spool valve, the low pressure tank line at a lower pressure than a pressure of the high pressure line; a spool valve; a first worktool port connected to the spool valve by the first worktool line; a second worktool port connected to the spool valve by the second worktool line; a high pressure flow source of hydraulic fluid connected to the spool valve by a high pressure line; a low pressure tank line connected to the spool valve, the low pressure tank line at a lower pressure than a pressure of the high pressure line; wherein when performing the worktool disconnect routine the controller is configured to: check that a power source of the work machine is operating; instruct the high pressure flow source of hydraulic fluid to provide no flow of hydraulic fluid in the high pressure line to the spool valve; instruct the spool valve to move to a first position wherein the first worktool port is connected to the low pressure tank line and the second worktool port is connected to the high pressure flow source in order to reduce a pressure in the first worktool line; and instruct the spool valve to move to a second position wherein the second worktool port is connected to the low pressure tank line and the first worktool port is connected to the high pressure flow source in order to reduce a pressure in the second worktool line. check that a power source of the work machine is operating; instruct the high pressure flow source of hydraulic fluid to provide no flow of hydraulic fluid in the high pressure line to the spool valve; instruct the spool valve to move to a first position wherein the first worktool port is connected to the low pressure tank line and the second worktool port is connected to the high pressure flow source in order to reduce a pressure in the first worktool line; and instruct the spool valve to move to a second position wherein the second worktool port is connected to the low pressure tank line and the first worktool port is connected to the high pressure flow source in order to reduce a pressure in the second worktool line.