Minor refactoring of the SILK PLC code to save more stack