Refactor of the signal handlers since they were making the process method a bit fat