Wrapped custom signal handler function in a type and added more comments