Added some signal handling.